<?php

class My_acl extends Zend_Acl {
	
	public function __construct() {
		$this->add ( new Zend_Acl_Resource ( 'a-1' ) );
		$this->add ( new Zend_Acl_Resource ( 'a0' ), 'a-1' );
		$this->add ( new Zend_Acl_Resource ( 'a1' ), 'a0' );
		
		$this->addRole ( new Zend_Acl_Role ( 'member' ) );
		$this->addRole ( new Zend_Acl_Role ( 'section' ), 'member' );
		$this->addRole ( new Zend_Acl_Role ( 'admin' ), 'section' );
		
		$this->allow ( 'member', 'a-1' );
		$this->allow ( 'member', 'a0' );
		$this->deny ( 'member', 'a1' );
		$this->allow ( 'section', 'a1' );
//		$this->deny ( 'member', 'a0', 'control' );
		$this->allow ( 'section', 'a0', 'control' );
		$this->deny ( 'section', 'a1', 'control' );
		$this->allow ( 'admin', 'a1', 'control' );
	}
}

?>
